package com.teamall.web.sys.db.arg;

import java.util.*;
import java.math.*;
import org.apache.commons.lang.*;

public class SysPhotoArg {
    private String pk_name = "PHOTO_ID";

    private String orderByClause;

    private String groupByClause;

    private String columns;

    private String countsql1;

    private String countsql2;

    private boolean distinct;

    private int rowStart = 0;

    private int rowEnd = 10;

    private List<SysPhotoCriteria> oredCriteria;

    public SysPhotoArg() {
        oredCriteria = new ArrayList<SysPhotoCriteria>();
    }

    public void setPk_name(String pk_name) {
        this.pk_name = StringEscapeUtils.escapeSql(pk_name);
    }

    public String getPk_name() {
        return pk_name;
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = StringEscapeUtils.escapeSql(orderByClause);
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setGroupByClause(String groupByClause) {
        this.groupByClause = StringEscapeUtils.escapeSql(groupByClause);
    }

    public String geGroupByClause() {
        return groupByClause;
    }

    public void setColumns(String columns) {
        this.columns = StringEscapeUtils.escapeSql(columns);
    }

    public String geColumns() {
        return columns;
    }

    public void setCountsql1(String countsql1) {
        this.countsql1 = StringEscapeUtils.escapeSql(countsql1);
    }

    public String geCountsql1() {
        return countsql1;
    }

    public void setCountsql2(String countsql2) {
        this.countsql2 = StringEscapeUtils.escapeSql(countsql2);
    }

    public String geCountsql2() {
        return countsql2;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public void setRowStart(int rowStart) {
        this.rowStart = rowStart;
    }

    public void setRowEnd(int rowEnd) {
        this.rowEnd = rowEnd;
    }

    public int getRowStart() {
        return rowStart;
    }

    public int getRowEnd() {
        return rowEnd;
    }

    public List<SysPhotoCriteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(SysPhotoCriteria criteria) {
        oredCriteria.add(criteria);
    }

    public SysPhotoCriteria or() {
    	SysPhotoCriteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public SysPhotoCriteria createCriteria() {
    	SysPhotoCriteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected SysPhotoCriteria createCriteriaInternal() {
    	SysPhotoCriteria criteria = new SysPhotoCriteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        groupByClause = null;
        columns = null;
        countsql1 = null;
        countsql2 = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<SysPhotoCriterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<SysPhotoCriterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<SysPhotoCriterion> getAllCriteria() {
            return criteria;
        }

        public List<SysPhotoCriterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new SysPhotoCriterion(condition));
        }

        protected void addCriterion(String condition, Object value,
                String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property
                        + " cannot be null");
            }
            criteria.add(new SysPhotoCriterion(condition, value));
        }

        protected void addCriterion(String condition, Object value,
                String property, int likeType) {
            if (value == null) {
                throw new RuntimeException("Value for " + property
                        + " cannot be null");
            }
            criteria.add(new SysPhotoCriterion(condition, value, likeType));
        }

        protected void addCriterion(String condition, Object value1,
                Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property
                        + " cannot be null");
            }
            criteria.add(new SysPhotoCriterion(condition, value1, value2));
        }

        public SysPhotoCriteria andCriterionEqualTo(String criterion) {
            if (StringUtils.isBlank(criterion)) {
                criterion = "1=1";
            }
            addCriterion(criterion);
            return (SysPhotoCriteria) this;
        }
        public SysPhotoCriteria andPhotoIdIsNull() {
            addCriterion("PHOTO_ID is null");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoIdIsNotNull() {
            addCriterion("PHOTO_ID is not null");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoIdEqualTo(Integer value) {
            addCriterion("PHOTO_ID =", value, "PHOTO_ID");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoIdNotEqualTo(Integer value) {
            addCriterion("PHOTO_ID <>", value, "PHOTO_ID");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoIdGreaterThan(Integer value) {
            addCriterion("PHOTO_ID >", value, "PHOTO_ID");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("PHOTO_ID >=", value, "PHOTO_ID");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoIdLessThan(Integer value) {
            addCriterion("PHOTO_ID <", value, "PHOTO_ID");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoIdLessThanOrEqualTo(Integer value) {
            addCriterion("PHOTO_ID <=", value, "PHOTO_ID");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoIdLike(Integer value) {
            addCriterion("PHOTO_ID like ", value, "PHOTO_ID", 1);
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoIdNotLike(Integer value) {
            addCriterion("PHOTO_ID  not like ", value, "PHOTO_ID", 1);
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoIdLeftLike(Integer value) {
            addCriterion("PHOTO_ID like ", value, "PHOTO_ID", 0);
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoIdNotLeftLike(Integer value) {
            addCriterion("PHOTO_ID  not like ", value, "PHOTO_ID", 0);
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoIdRightLike(Integer value) {
            addCriterion("PHOTO_ID like ", value, "PHOTO_ID", 2);
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoIdNotRightLike(Integer value) {
            addCriterion("PHOTO_ID  not like ", value, "PHOTO_ID", 2);
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoIdIn(List<Integer> values) {
            addCriterion("PHOTO_ID  in ", values, "PHOTO_ID");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoIdNotIn(List<Integer> values) {
            addCriterion("PHOTO_ID not in ", values, "PHOTO_ID");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoIdBetween(Integer value1, Integer value2) {
            addCriterion("PHOTO_ID between ", value1, value2, "PHOTO_ID");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoIdNotBetween(Integer value1, Integer value2) {
            addCriterion("PHOTO_ID not between ", value1, value2, "PHOTO_ID");
            return (SysPhotoCriteria) this;
        }
        public SysPhotoCriteria andFilePathIsNull() {
            addCriterion("FILE_PATH is null");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andFilePathIsNotNull() {
            addCriterion("FILE_PATH is not null");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andFilePathEqualTo(String value) {
            addCriterion("FILE_PATH =", value, "FILE_PATH");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andFilePathNotEqualTo(String value) {
            addCriterion("FILE_PATH <>", value, "FILE_PATH");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andFilePathGreaterThan(String value) {
            addCriterion("FILE_PATH >", value, "FILE_PATH");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andFilePathGreaterThanOrEqualTo(String value) {
            addCriterion("FILE_PATH >=", value, "FILE_PATH");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andFilePathLessThan(String value) {
            addCriterion("FILE_PATH <", value, "FILE_PATH");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andFilePathLessThanOrEqualTo(String value) {
            addCriterion("FILE_PATH <=", value, "FILE_PATH");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andFilePathLike(String value) {
            addCriterion("FILE_PATH like ", value, "FILE_PATH", 1);
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andFilePathNotLike(String value) {
            addCriterion("FILE_PATH  not like ", value, "FILE_PATH", 1);
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andFilePathLeftLike(String value) {
            addCriterion("FILE_PATH like ", value, "FILE_PATH", 0);
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andFilePathNotLeftLike(String value) {
            addCriterion("FILE_PATH  not like ", value, "FILE_PATH", 0);
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andFilePathRightLike(String value) {
            addCriterion("FILE_PATH like ", value, "FILE_PATH", 2);
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andFilePathNotRightLike(String value) {
            addCriterion("FILE_PATH  not like ", value, "FILE_PATH", 2);
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andFilePathIn(List<String> values) {
            addCriterion("FILE_PATH  in ", values, "FILE_PATH");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andFilePathNotIn(List<String> values) {
            addCriterion("FILE_PATH not in ", values, "FILE_PATH");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andFilePathBetween(String value1, String value2) {
            addCriterion("FILE_PATH between ", value1, value2, "FILE_PATH");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andFilePathNotBetween(String value1, String value2) {
            addCriterion("FILE_PATH not between ", value1, value2, "FILE_PATH");
            return (SysPhotoCriteria) this;
        }
        public SysPhotoCriteria andCreateDateIsNull() {
            addCriterion("CREATE_DATE is null");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andCreateDateIsNotNull() {
            addCriterion("CREATE_DATE is not null");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andCreateDateEqualTo(String value) {
            addCriterion("CREATE_DATE =", value, "CREATE_DATE");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andCreateDateNotEqualTo(String value) {
            addCriterion("CREATE_DATE <>", value, "CREATE_DATE");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andCreateDateGreaterThan(String value) {
            addCriterion("CREATE_DATE >", value, "CREATE_DATE");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andCreateDateGreaterThanOrEqualTo(String value) {
            addCriterion("CREATE_DATE >=", value, "CREATE_DATE");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andCreateDateLessThan(String value) {
            addCriterion("CREATE_DATE <", value, "CREATE_DATE");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andCreateDateLessThanOrEqualTo(String value) {
            addCriterion("CREATE_DATE <=", value, "CREATE_DATE");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andCreateDateLike(String value) {
            addCriterion("CREATE_DATE like ", value, "CREATE_DATE", 1);
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andCreateDateNotLike(String value) {
            addCriterion("CREATE_DATE  not like ", value, "CREATE_DATE", 1);
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andCreateDateLeftLike(String value) {
            addCriterion("CREATE_DATE like ", value, "CREATE_DATE", 0);
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andCreateDateNotLeftLike(String value) {
            addCriterion("CREATE_DATE  not like ", value, "CREATE_DATE", 0);
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andCreateDateRightLike(String value) {
            addCriterion("CREATE_DATE like ", value, "CREATE_DATE", 2);
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andCreateDateNotRightLike(String value) {
            addCriterion("CREATE_DATE  not like ", value, "CREATE_DATE", 2);
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andCreateDateIn(List<String> values) {
            addCriterion("CREATE_DATE  in ", values, "CREATE_DATE");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andCreateDateNotIn(List<String> values) {
            addCriterion("CREATE_DATE not in ", values, "CREATE_DATE");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andCreateDateBetween(String value1, String value2) {
            addCriterion("CREATE_DATE between ", value1, value2, "CREATE_DATE");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andCreateDateNotBetween(String value1, String value2) {
            addCriterion("CREATE_DATE not between ", value1, value2, "CREATE_DATE");
            return (SysPhotoCriteria) this;
        }
        public SysPhotoCriteria andPhotoCodeIsNull() {
            addCriterion("PHOTO_CODE is null");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoCodeIsNotNull() {
            addCriterion("PHOTO_CODE is not null");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoCodeEqualTo(String value) {
            addCriterion("PHOTO_CODE =", value, "PHOTO_CODE");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoCodeNotEqualTo(String value) {
            addCriterion("PHOTO_CODE <>", value, "PHOTO_CODE");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoCodeGreaterThan(String value) {
            addCriterion("PHOTO_CODE >", value, "PHOTO_CODE");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoCodeGreaterThanOrEqualTo(String value) {
            addCriterion("PHOTO_CODE >=", value, "PHOTO_CODE");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoCodeLessThan(String value) {
            addCriterion("PHOTO_CODE <", value, "PHOTO_CODE");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoCodeLessThanOrEqualTo(String value) {
            addCriterion("PHOTO_CODE <=", value, "PHOTO_CODE");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoCodeLike(String value) {
            addCriterion("PHOTO_CODE like ", value, "PHOTO_CODE", 1);
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoCodeNotLike(String value) {
            addCriterion("PHOTO_CODE  not like ", value, "PHOTO_CODE", 1);
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoCodeLeftLike(String value) {
            addCriterion("PHOTO_CODE like ", value, "PHOTO_CODE", 0);
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoCodeNotLeftLike(String value) {
            addCriterion("PHOTO_CODE  not like ", value, "PHOTO_CODE", 0);
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoCodeRightLike(String value) {
            addCriterion("PHOTO_CODE like ", value, "PHOTO_CODE", 2);
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoCodeNotRightLike(String value) {
            addCriterion("PHOTO_CODE  not like ", value, "PHOTO_CODE", 2);
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoCodeIn(List<String> values) {
            addCriterion("PHOTO_CODE  in ", values, "PHOTO_CODE");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoCodeNotIn(List<String> values) {
            addCriterion("PHOTO_CODE not in ", values, "PHOTO_CODE");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoCodeBetween(String value1, String value2) {
            addCriterion("PHOTO_CODE between ", value1, value2, "PHOTO_CODE");
            return (SysPhotoCriteria) this;
        }

        public SysPhotoCriteria andPhotoCodeNotBetween(String value1, String value2) {
            addCriterion("PHOTO_CODE not between ", value1, value2, "PHOTO_CODE");
            return (SysPhotoCriteria) this;
        }

    }

    public static class SysPhotoCriteria extends GeneratedCriteria {

        protected SysPhotoCriteria() {
            super();
        }
    }

    public static class SysPhotoCriterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected SysPhotoCriterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }
        protected SysPhotoCriterion(String condition, Object value, int likeType) {
            this.condition = condition;
            if (likeType == 0) {
                this.value = "%" + value;
            }
            else if (likeType == 1) {
                this.value = "%" + value + "%";
            }
            else {
                this.value = value + "%";
            }
            this.typeHandler = null;
            this.singleValue = true;

        }

        protected SysPhotoCriterion(String condition, Object value,
                String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            }
            else {
                this.singleValue = true;
            }
        }

        protected SysPhotoCriterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected SysPhotoCriterion(String condition, Object value,
                Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected SysPhotoCriterion(String condition, Object value,
                Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}